//
// Created by wzr on 2021/5/22.
//

#ifndef UNTITLED1_DATA_H
#define UNTITLED1_DATA_H
#define MYSQLURL "tcp://124.71.174.198:3306"
#define ACCOUNT "root"
#define PWD "root"

#include <string>
#include <sstream>
#include <mysql_driver.h>
#include <mysql_connection.h>
#include <cppconn/statement.h>
#include <cppconn/prepared_statement.h>
#include <cppconn/resultset.h>
#include "SchoolCard.h"
#include "Bus.h"

using namespace std;
using namespace sql;

class User;
class Card;

void executeStatement(const string& query);

void executePreStatement();

void incTaking(int num);

void updateBalance(int num, int delta);

void updateFree(int num, int delta);

User randomUser();

bool getCard(User *user, Card *&card1);

Bus getBus();
#endif //UNTITLED1_DATA_H
